package com.shopx.auth.service;

import com.shopx.auth.bean.SysOrg;
import com.shopx.auth.model.SysOrgModel;
import com.shopx.base.exception.ShopxException;
import com.shopx.cmm.DTO.PageDTO;

import java.util.List;

/**
 * @author lituo
 * @className: ISysOrgService
 * @description: 组织机构
 * @date 2021/12/5 10:42 AM
 */
public interface ISysOrgService {

  /**
   * 新增记录
   *
   * @param sysOrg
   * @return int
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  int insertSelective(SysOrg sysOrg) throws ShopxException;

  /**
   * 删除记录
   *
   * @param sysOrg
   * @return int
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  int deleteByPrimaryKey(SysOrg sysOrg) throws ShopxException;

  /**
   * 查询明细记录
   *
   * @param sysOrg
   * @return com.shopx.auth.model.SysOrgModel
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  SysOrgModel selectByPrimaryKey(SysOrg sysOrg) throws ShopxException;

  /**
   * 修改记录
   *
   * @param sysOrg
   * @return int
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  int updateByPrimaryKeySelective(SysOrg sysOrg) throws ShopxException;

  /**
   * 分页查询
   *
   * @param sysOrgModel
   * @return com.shopx.cmm.dto.PageDTO<com.shopx.auth.model.SysOrgModel>
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  PageDTO<SysOrgModel> getListPage(SysOrgModel sysOrgModel) throws ShopxException;

  /**
   * 查询父菜单下子菜单
   *
   * @return java.util.List<com.shopx.auth.model.SysOrgModel>
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  List<SysOrgModel> queryOrgNodeList() throws ShopxException;

  /**
   * 树状展示组织机构
   *
   * @param sysOrg
   * @return java.util.List<com.shopx.auth.model.SysOrgModel>
   * @author lituo
   * @date 3:15 PM 2021/12/5
   */
  List<SysOrgModel> selectOrgTreeList(SysOrgModel sysOrg);

  /**
   * 查询
   * @param parUrlId
   * @return
   * @throws ShopxException
   */
  String queryOrgTreeList(String parUrlId) throws ShopxException;

  /**
   * 查询已经绑定的组织机构节点
   * @param sysOrg
   * @return
   */
  String queryEditOrgNodeList(SysOrgModel sysOrg);

  /**
   * 获取指定orgId下面所有的子级组织机构
   * @param parOrgId
   * @return
   * @throws ShopxException
   */
  List<SysOrgModel> selectListByParOrgId(String parOrgId) throws ShopxException;
}

